﻿using Domain.Entity.Basic_information;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCore.Configer.Basic_information
{
    public class Carrier_mentConfiger : IEntityTypeConfiguration<Carrier_ment>
    {
        public void Configure(EntityTypeBuilder<Carrier_ment> builder)
        {
            builder.ToTable(nameof(Carrier_ment));
            builder.HasKey(e => e.Cr_id);
            builder.Property(e => e.Cr_id).HasColumnType("bigint");
            builder.Property(e => e.Cr_encode).HasColumnType("varchar(64)");
            builder.Property(e => e.Cr_cp_name).HasColumnType("varchar(40)");
            builder.Property(e => e.Cr_type).HasColumnType("varchar(20)");
            builder.Property(e => e.Cr_bn_license_num).HasColumnType("varchar(64)");
            builder.Property(e => e.Cr_bus_license_num).HasColumnType("varchar(64)");
            builder.Property(e => e.Cr_tax_reg).HasColumnType("varchar(20)");
            builder.Property(e => e.Cr_region).HasColumnType("varchar(50)");
            builder.Property(e => e.Cr_address).HasColumnType("varchar(64)");
            builder.Property(e => e.Cr_postcode).HasColumnType("varchar(64)");
            builder.Property(e => e.Cr_state).IsRequired().HasComment("承运商状态：0、禁用 1、启用");
            builder.Property(e => e.Cr_bn_license).HasColumnType("varchar(100)");
            builder.Property(e => e.Cr_information).HasColumnType("varchar(64)");
            builder.Property(e => e.Cr_name).HasColumnType("varchar(20)");
            builder.Property(e => e.Cr_phone).HasColumnType("varchar(30)");
            builder.Property(e => e.Cr_department).HasColumnType("varchar(20)");
            builder.Property(e => e.Cr_posts).HasColumnType("varchar(20)");
            builder.Property(e => e.Cr_email).HasColumnType("varchar(50)");
            builder.Property(e => e.Cr_qq).HasColumnType("varchar(20)");
            builder.Property(e => e.Cr_io_title).HasColumnType("varchar(64)");
            builder.Property(e => e.Cr_tp_identification).HasColumnType("varchar(64)");
            builder.Property(e => e.Cr_bank).HasColumnType("varchar(30)");
            builder.Property(e => e.Cr_ao_name).HasColumnType("varchar(30)");
            builder.Property(e => e.Cr_account).HasColumnType("varchar(64)");
            builder.Property(e => e.Cr_contract).HasColumnType("tinyint").IsRequired().HasComment("是否签订合同:0、否 1、是");
        }
    }
}
